1. Field of the Invention
This invention relates to a data error detection and correction circuit for use in digital systems such as digital audio disc (DAD) players.
2. Prior Art
In DAD systems, data errors are attributable to a damaged disc of which damage may either be present in the disc from the beginning or develop during the handling thereof, a disturbance in an associated reproduction system and so on. Such data errors must be corrected so that the DAD player can reproduce musical signals properly. Therefore, it is essential for DAD players to be equipped with a circuitry for detecting and correcting such data errors.
It is known in the art to detect such data errors by means of Reed Solomon code. The Reed Solomon code method will now be described. Both musical signal data and error correction parity data are stored in a disc. FIG. 1 schematically shows a portion of data stored in the disc, the data comprising a number of frames Fr each comprising signal data W0 to W27, error correction parity data P0 to P3, and a synchronization pattern SYNC. Each of the signal data W0 to W27 as well as each of the parity data P0 to P3 is composed of eight bits. The frame Fr is a data unit for data error correction. Control data and additional error correction parity data other than the parity data P0 to P3 are also stored in the frame Fr, but they are omitted for simplicity of explanation of this invention. All of the above data are modulated in an EFM (Eight to Fourteen Modulation) fashion and stored in the disc. The parity data P0 to P3 are determined to establish the following formula (1): ##EQU1## wherein .alpha. is a primitive element with respect to a formula "F(X)=X.sup.8 +X.sup.3 +X.sup.2 +1".
For reproducing the musical signals, the signal data W0 to W27 and parity data P0 to P3 shown in FIG. 1 are read out from the disc, and syndromes S0 to S3 are calculated in accordance with the data W0 to W27 and P0 to P3, through associated digital computing means in the following manner: ##EQU2##
Then, in accordance with respective values of syndromes S0 to S3 it is determined whether there is any error in the data W0 to W27 and P0 to P3, and if any errors are determined to exist, their positions are detected and they are corrected in a manner described hereinafter.
In this Reed Solomon code method, the parity data P0 to P3 are not distinguished from the musical signal data W0 to W27. More specifically, the parity data P0 to P3 can be considered as imaginary signal data W28 to W31 following the signal data W0 to W27. Therefore, with this method, any error in the parity data P0 to P3 can also be detected. Thus, errors in the parity data P0 to P3 can be recognized as errors in the signal data W28 to W31, respectively. For example, if it is detected that there is an error in the thirtieth data, that is, the data W 29, this means that this error exists in the parity data P1.
.circle.1 . Determination of data error
It is determined whether the following formula (3) is established: ##EQU3##
If the formula (3) is established, then there is no error in any of the data W0 to W27 and P0 to P3. On the other hand, if the formula is not established, then there is an error in one or more of the data W0 to W27 and P0 to P3.
.circle.2 . Detection of single data error
Assuming that there is an error only in No. j of the data W0 and W27 and W28 to W31 (P0 to P3), i.e., the data Wj, the following formula (4) is established: ##EQU4## wherein Ej is data error or error pattern, i.e., a difference between correct data Wj (hereinafter referred to as &lt;Wj&gt;) and the data Wj read out from the disc. The following formulas (5) and (6) are obtained from the formula (4): EQU S1.sup.2 =S0.multidot.S2 (5) EQU S2.sup.2 =S1.multidot.S3 (6)
If there is an error in the data Wj, the following formulas (7) to (10) are also established: EQU S0.noteq.0 (7) EQU S1.noteq.0 (8) EQU S2.noteq.0 (9) EQU S3.noteq.0 (10)
Thereafter, it is determined whether all of the formulas (5) to (10) are established, and if these formulas are established, it is decided that there is an error only in the data Wj. In this case, the data error Ej is syndrome S0.
.circle.3 . Correction of single data error
The following formula (11) is obtained from the formula (4): EQU S1/S0=.alpha..sup.j ( 11)
The left member of the formula (11) is calculated, and in accordance with the result of this calculation, the position j of the incorrect data is detected. Then, the data error Ej, which is equal to S0 (Ej=S0), is added to the data Wj read out from the disc to obtain the coreect data &lt;Wj&gt; as indicated in the following formula (12): EQU Wj+Ej=&lt;Wj&gt; (12)
.circle.4 . Detection of double data error
Assuming that there is an error in each of data Wk and Wl, the formula (13) is established: ##EQU5## wherein Ek and El are data errors of the data Wk and Wl, respectively.
The following formulas (14) and (15) are obtained from the formula (13): ##EQU6##
Also, in this case, the following formulas (16) and (17) are established: EQU 0.ltoreq.k, l.ltoreq.31 (16) EQU k.noteq.l (17)
In this case, if each of k and l is one of 28 to 31, each error exists in any of the parity data P0 to P3.
Therefore, the right member of each of the formulas (14) and (15) is calculated from syndromes S0 to S3, and then k and l are obtained from the formulas (14) to (17). If k and l can be obtained, it is decided that there is an error in each of the data Wk and Wl. On the other hand, if k and l can not be obtained although there is more than one error, then there are at least three errors in the data W0 to W27 and P0 to P3. Incidentally, it is not possible to detect the positions of more than two incorrect data by means of syndromes S0 to S3.
.circle.5 . Correction of double data error
In the case where there is an error in each of the data Wk and Wl, each of the data errors Ek and El is calculated from the following formula (18): ##EQU7##
The data errors Ek and El are added respectively to the data Wk and Wl detected at the above step in item .circle.4 , to obtain the correct data &lt;Wk&gt; and &lt;Wl&gt;, as indicated in the following: EQU Wk+Ek=&lt;Wk&gt; (19) EQU Wl+El=&lt;Wl&gt; (20)
Thus, the data error detection and correction is carried out with the Reed Solomon code method in the above-mentioned manner.